<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"

      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Login</title>
    </h:head>
    <h:body>
        <h:form>
            <p:panel id="p1" rendered="#{customerBean.cus==null}" style="width: 310px" >
                <p:panelGrid columns="2">
                    <f:facet name="header">
                        Login !!!
                    </f:facet>
                    <h:outputLabel for="txtCustomerName" value="Account :" style="font-size: 0.9em" />
                    <h:inputText id="txtCustomerName" value="#{customerBean.customerName}" label="Account" style="width: 150px;color: #191919" required="true" />

                    <h:outputLabel for="txtCusPassword" value="Password :" style="font-size: 0.9em" />
                    <h:inputSecret id="txtCusPassword" value="#{customerBean.cusPassword}" required="true" label="Password" style="width: 150px;color: #191919"/>
                    <f:facet name="footer">
                        <p:commandButton   action="#{customerBean.checkLogin}" value="Login" icon="ui-icon-check" style="margin-left: 90px"/>
                    </f:facet>
                </p:panelGrid>
            </p:panel>
            <p:panel id="p2" rendered="#{customerBean.cus!=null}" style="width: 250px" >
                <h:outputText value="#{customerBean.cus.cusFullName}"/>
            </p:panel>
            
        </h:form>
    </h:body>
</html>
